<h1>Барааны Категори</h1>

<?php echo link_to('жагсаалт', 'productCategory/index', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('шинээр нэмэх', 'productCategory/new', array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<table>
  <thead>
    <tr>
      <th>#</th>
      <th>Нэр</th>
      <th>Категорын тухай</th>
      <th>Зураг</th>
      <th>Эцэг категори</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($product_categorys as $product_category): ?>
    <tr>
      <td><a href="<?php echo url_for('productCategory/edit?id='.$product_category->getId()) ?>"><?php echo $product_category->getId() ?></a></td>
      <td><?php echo $product_category->getName() ?></td>
      <td><?php echo $product_category->getDescription() ?></td>
      <td><?php echo image_tag('/uploads/productCategory/'.$product_category->getPicture(), array('style'=>'max-width:200px;max-height:150px;')) ?></td>      
       <td><?php echo $product_category->getParentId() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

 
